<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
<f:view contentType="text/html">
	<h:head>
		<h:outputStylesheet name="cdtoHome.css" library="css"/>
		<title>Controle de Doação e Transplantes de Órgãos</title>
	</h:head>
	<h:body>
	
		<p:layout fullPage="true">

			
			<p:layoutUnit position="north" size="105">
			<h:form id="header" prependId="false">
				<p:growl life="3000" showDetail="true" sticky="true" autoUpdate="true" escape="true"/>			
			
				<p:toolbar >
					
				<p:toolbarGroup align="right" style="font-size: 12px">
					<h:outputLabel value="Usuário:"/>
					<h:outputLabel value="#{layoutMB.userName}"/>
					<p:separator /> 
					<p:commandLink	value="logout" rendered="#{layoutMB.loged}" action="#{layoutMB.logout}"/>
					<p:commandLink	value="login" rendered="#{!layoutMB.loged}" action="#{layoutMB.login}"/>
					<p:separator /> 
						
					<div
						style="width: 600px; height: 37px; position: absolute; right: 0; top: 22px;">
						<span
							style="position: absolute; bottom: 0; right: 50px; font-size: 20px;">
							<ui:insert name="actualHeaderText">
						</ui:insert>
						</span> <span
							style="position: absolute; bottom: 5px; right: 10px; width: 25px; height: 25px;">
							<p:ajaxStatus style="width:25px;height:25px;">
								<f:facet name="start">
									<h:graphicImage url="/resources/img/ajaxloading.gif" />
								</f:facet>

								<f:facet name="complete">
									<h:outputText value="" />
								</f:facet>
							</p:ajaxStatus>
						</span>
					</div>
				</p:toolbarGroup>
			</p:toolbar>
				<p:commandLink action="#{layoutMB.toIndex}" style="padding-left:20px;">
					<h:graphicImage height="90%" url="/resources/img/logo.PNG" />
				</p:commandLink>
			</h:form>
			</p:layoutUnit>

			<p:layoutUnit position="west" size="200" header="Menu"
				resizable="true" collapsible="true">
				<h:form>					
					<p:accordionPanel>
	                        <p:tab title="Órgão">
	                            <h:commandLink value="Córnea" action="#{layoutMB.toCornea}"/>
	                        </p:tab>
	                 </p:accordionPanel>
				</h:form>
			</p:layoutUnit>

			<p:layoutUnit position="center" >
				<ui:insert name="corpo" />
			</p:layoutUnit>
			
			<p:layoutUnit position="south" size="30" style="text-align:center">
				<p:outputLabel value="Controle de Doação e Transplante de Orgãos" />
			</p:layoutUnit>

		</p:layout>

	</h:body>
</f:view>
</html>